<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<ui:composition template="./templates/layoutSinMenu.xhtml">
    <ui:define name="content">
        <f:view>
            <h:body>
                <h:form id="loginForm" prependId="false">
                    <p:layout fullPage="true">
                        <p:layoutUnit id="top" position="center" size="140">
                            <p:spacer height="10%"/>

                            <div style="width:100%; z-index: 2">
                                <div class="text_header" align="center">
                                    <h:graphicImage library="images" name="logo-qaliwarma.png"
                                                    /><br/><br/>   SIPAR
                                </div>
                                <br/>
                            </div>

                            <p:spacer height="5%"/>
                            <table width="20%" align="center">
                                <tr>
                                    <td align="center">
                                        <div id="apDiv1" >
                                            <div id="login">
                                                <c:if test="${not empty param.authFailure}">
                                                    <div class="ui-message-error ui-widget ui-corner-all"
                                                         style="text-align: center;margin: 0.5em 0.5em 0.5em 0.5em;">
                                                        #{messages.label_security_err}
                                                    </div>
                                                </c:if>
                                            </div>
                                            <div id="form">
                                                <div style="text-align: center;font-size: 15px;color: #000000" align="center">
                                                    Control de Accesos
                                                </div>
                                                <br/>
                                                <h:panelGrid columns="2" styleClass="dialog" columnClasses="col1, col2"
                                                             bgcolor="">
                                                    <h:outputLabel value="#{messages.label_login}"/>
                                                    <h:inputText id="j_username" name="j_username" required="true"
                                                                 value="#{loginJsfBean.username}" maxlength="15"
                                                                 requiredMessage="El campo Usuario es requerido."/>


                                                    <h:outputLabel escape="false" value="#{messages.label_password}"/>
                                                    <h:inputSecret id="j_password" maxlength="8"
                                                                   value="#{loginJsfBean.password}"
                                                                   requiredMessage="El campo Contraseña es requerido."
                                                                   required="true"/>
                                                    <h:outputLabel value=""/>
                                                    <p:commandButton id="logButton" actionListener="#{loginJsfBean.loginAction}"
                                                                     update="errorMsg"
                                                                     value="#{messages.label_loginBtn}" ajax="false"/>
                                                </h:panelGrid>
                                            </div>

                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <div style="z-index: 2;">
                                            <p:message for="j_username"/>
                                            <br></br>
                                            <p:message for="j_password"/>
                                            <br></br>
                                        </div>
                                    </td>
                                </tr>
                            </table>


                        </p:layoutUnit>
                    </p:layout>
                </h:form>
            </h:body>
        </f:view>
    </ui:define>
</ui:composition>

</html>